<?php
    use yii\helpers\Url;
    use yii\helpers\Html;
?>
<!DOCTYPE html>
<html lang="ch">
<head>
    <meta charset="UTF-8"/>
    <title>后台管理</title>
    <style>
        /*下面是针对字体图标的设置*/
        @font-face {font-family: 'iconfont';
            src: url('./pic/iconfont/iconfont.eot'); /* IE9*/
            src: url('./pic/iconfont/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
            url('./pic/iconfont/iconfont.woff') format('woff'), /* chrome、firefox */
            url('./pic/iconfont/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
            url('./pic/iconfont/iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */
        }
        .iconfont {
            font-family:"iconfont" !important;
            font-size:24px;
            font-style:normal;
            -webkit-font-smoothing: antialiased;
            -webkit-text-stroke-width: 0.05px;
            -moz-osx-font-smoothing: grayscale;
        }
    </style>
</head>
<body>
<?php $this->beginBody() ?>
<div id="content">
    <div id="content-box">
        <div class="content-head">
            <div class="keyboard padding-l40">
                <!--<input type="text" class="search padding-l40 color-black" placeholder="站内搜索"/>-->
                <div class="keyboard-botton">
                    <a href="<?= \yii\helpers\Url::to(['login/logout']); ?>" class="on-off">
                        <i class="iconfont">&#xe60f;</i>
                    </a>
                </div>
            </div>
            <div class="navigation padding-l40">
                <a class="float-l" href="javascript:void(0);">后台管理</a>
                <i class="iconfont float-l">&#xe606;</i>
                <a href="javascript:void(0);" class="ratings float-l"></a>
                <span class="define"></span>
            </div>
        </div>
        <?=  $content ?>
    </div>
</div>
<div class="menus">
    <div class="admin">
        <p  class="admin-img float-l" >
            <img src="./pic/portrait.png" alt="">
        </p>
        <p class="admin-text float-l">
            <span class="color-white">用户 / admin</span><br/>
            <span class="font-s12">超级管理员</span>
        </p>
    </div>
    <div class="menu-li">
        <ul>
            <?php
            //这里使用动态变量来加载选中导航的css样式
                $selectClass=$this->context->id;
                if($selectClass=='articlect' || $selectClass=='editor'){
                    $selectClass='article';
                }
                if($selectClass=='productct' || $selectClass=='editorp'){
                    $selectClass='product';
                }
                $$selectClass=' hovers';
            ?>
            <li>
                <a href="<?= Url::to(['/home/index']); ?>" class="home<?= isset($home)?$home:''; ?>">
                    <i class="iconfont">&#xe601;</i>&nbsp;&nbsp;首页
                </a>
            </li>
            <li>
                <a href="<?= Url::to(['/article/index']); ?>" class="article<?= isset($article)?$article:''; ?>">
                    <i class="iconfont">&#xe610;</i>&nbsp;&nbsp;文章管理
                </a>
            </li>
            <li>
                <a href="<?= Url::to(['/category/index']); ?>" class="article<?= isset($category)?$category:''; ?>">
                    <i class="iconfont">&#xe613;</i>&nbsp;&nbsp;分类
                </a>
            </li>
        </ul>
    </div>
</div>
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript">
    Checkbox();
    Bulked('<?= Yii::$app->request->csrfToken ?>','<?= Url::to(['articlect/updateall']);?>');
    //面包屑标签
    $('.ratings').append("<?= isset($info['rating'])? $info['rating']: '';?>");
    $('.define').append("<?= isset($info['define'])? $info['define']: '';?>");
</script>
<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>